<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="layout :: htmlhead" th:with="title='用户管理'"></head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头-->
    <div th:replace="fragments/head :: header"></div>

    <div class="layui-body" style="margin: 1%">

        <form id="messageSendRecordSearch" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <div class="layui-form-item">
                <label class="layui-form-label">发送模板</label>
                <div class="layui-input-inline">
                 <!--   <input id="qname" name="qname" autocomplete="off" class="layui-input" type="text"/>-->
                    <select name="qname" id="qname" lay-filter="mySelect">
                        <option value="">-选择-</option>
                        <!--/*@thymesVar id="templateName" type="assets"*/-->
                        <option
                            th:each="templateName : ${templateNames}"
                            th:value="${templateName.name}" th:text="${templateName.name}">
                        </option>
                    </select>
                </div>
                <label class="layui-form-label">发送渠道</label>
                <div class="layui-input-inline">
                    <input id="qchannel" name="qchannel" autocomplete="off" class="layui-input" type="text"/>
                </div>
                <label class="layui-form-label">接收人</label>
                <div class="layui-input-inline">
                    <input id="qreceiver" name="qreceiver" autocomplete="off" class="layui-input" type="text" />
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">结果</label>
                    <div class="layui-input-inline">
                        <div class="layui-form" lay-filter="myDiv">
                            <select name="qsuccess" id="qsuccess" lay-filter="mySelect">
                                <option value="">-选择-</option>
                                <option value="false">失败</option>
                                <option value="true">成功</option>
                            </select>
                        </div>
                    </div>

                    <label class="layui-form-label">发送时间</label>
                        <div class="layui-input-inline" style="width: 175px;">
                            <input name="qinsertTimeStart" id="qinsertTimeStart" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" type="text"/>
                        </div>
                    <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 175px;">
                            <input name="qinsertTimeEnd" id="qinsertTimeEnd" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" type="text"/>
                        </div>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    <button class="layui-btn"  lay-submit="" lay-filter="searchSubmit">提交</button>
                </div>
            </div>
        </form>

        <!--<hr class="layui-bg-blue"/>-->
         <hr class="layui-bg-black"/>

        <table id="messageSendRecordList" lay-filter="messageSendRecordTable"></table>
        <script type="text/html" id="isDelTpl">
            {{#  if(!d.isDel){ }}
             <font color="green">正常</font>
            {{#  } else { }}
             <font color="red">删除</font>
            {{#  } }}
        </script>
        <script type="text/html" id="optBar">
            <shiro:hasPermission name="messageSendRecordView">
             <a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
            </shiro:hasPermission>
        </script>
    </div>


    <!--查看发送记录-->
    <div id="setMessageSendRecord" class="layer_self_wrap" style="width:500px;display:none;text-align: center">
            <div class="layui-form-item">
                <label class="layui-form-label">发送模板</label>
                <div class="layui-input-inline">
                    <input id="name" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">发送渠道</label>
                <div class="layui-input-inline">
                    <input id="channel" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input" type="text" />
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">接收人</label>
                <div class="layui-input-inline">
                    <input id="receiver" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">结果</label>
                <div class="layui-input-inline">
                    <input id="success" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">失败异常</label>
                <div class="layui-input-inline">
                    <textarea id="exceptionContext" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-textarea"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">发送内容</label>
                <div class="layui-input-inline">
                    <textarea id="content" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-textarea"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">发送时间</label>
                <div class="layui-input-inline">
                    <input id="insertTime" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>
    </div>


    <!--底部-->
    <div th:replace="fragments/footer :: footer"></div>
    <script th:src="@{/js/dateUtils.js}"></script>
    <script th:src="@{/js/biz/msg/messageSendRecordList.js}"></script>

</div>
</body>
</html>